home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX 6.5 Applications 1998 June
/
SGI IRIX 6.5 Applications 1998 June.iso
/
dist
/
arraysvcs.idb
/
usr
/
lib
/
array
/
ampi.z
/
ampi
Wrap
Text File
|
1998-04-15
|
1KB
|
69 lines
#!/bin/ksh
#
# Simple script to fire up the MPI launcher
#
Launcher=/usr/bin/xmpi
Usage="ampi <origin> <display> <cwd> <array name> [<envvar> <value>]..."
#
# Make sure enough args were specified
#
if [ "$#" -lt 4 ]; then
echo "Incorrect number of arguments to $0"
echo $Usage
exit 1
fi
#
# Give command line args more meaningful names
#
Origin=$1
DISPLAY=$2
Cwd=$3
MPI_ARRAY=$4
shift 4
#
# Set some relevant environment variables that xwsh doesn't handle
#
eval HOME=~$LOGNAME
export DISPLAY HOME MPI_ARRAY
#
# Set any caller-specified environment variables
#
while [ $# -gt 1 ]; do
VarName=$1
VarValue=$2
if [ "$VarName" = "MPIRUN_DIR" -a "$VarValue" = "." ]; then
if [ "$Cwd" != "<>" ]; then
VarValue=$Cwd
fi
fi
eval "export $VarName="'"'$VarValue'"'
shift 2
done
#
# If MPIview is not installed, quit now
#
if [ ! -x $Launcher ]; then
/usr/bin/X11/xconfirm \
-c \
-header "Launch MPI Job" \
-t "Sorry, the MPI job launcher $Launcher is not installed" \
-icon error \
> /dev/null
exit 1
fi
#
# Invoke xmpi
#
exec $Launcher
exit 99 # "Shouldn't" make it to here